﻿Imports System
Imports System.Collections
Imports System.Configuration
Imports System.Data
Imports System.Linq
Imports System.Web
Imports System.Web.Security
Imports System.Web.UI
Imports System.Web.UI.HtmlControls
Imports System.Web.UI.WebControls
Imports System.Web.UI.WebControls.WebParts
Imports System.Xml.Linq
Imports BBDD
Imports Controladores

 _

Class modUsuarioDNI
   Inherits System.Web.UI.Page

   Protected Sub Page_Load(sender As Object, e As EventArgs)
      If Session("privUser") Is Nothing Or Integer.Parse(Session("privUser").ToString()) < 2 Then
         Response.Redirect("index.aspx")
      End If
   End Sub 'Page_Load
   
   
   Protected Sub boton_insertar_Click(sender As Object, e As EventArgs)
      If Consultas.existeUsuario(campoDNI.Text.ToString()) Then
         Session("DNIUser") = campoDNI.Text.ToString()
         Response.Redirect("modUsuario.aspx")
      Else
            controlador.CreateMessageAlert(Me, "No existe usuario con ese DNI", "Mensaje de error")
      End If 'Response.Redirect("modUsuarioDNI.aspx");
   End Sub 'boton_insertar_Click
End Class 'modUsuarioDNI 